﻿<%@ Page Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="StockOutManager.aspx.cs" Inherits="StockOutManager" Title="Untitled Page" %>
<%@ Register Src="GoodItems.ascx" TagName="GoodItems" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                出库单编号：
                </td>
                <td>
                <asp:TextBox ID="S_StockOutCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                出库日期：
                </td>
                <td>
                <asp:TextBox ID="S_StockOutDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                出库类型：
                </td>
                <td>
                <div class="select"><div><ofcc:DropDownList ID="S_StockOutType" runat="server" ></ofcc:DropDownList></div></div>
                </td>
                <td>
                    &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">出库管理</div>
    <div class="webPanelContent">
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input ID="StockOutID" checked="checked" name="StockOutID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"StockOutID")%>' />
                        <asp:HiddenField ID = "HiddenField1" runat="server" Value='<%#Eval("StockOutID") %>' /> 
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:HyperLinkField DataTextField="StockOutCode" HeaderText="出库单号" NavigateUrl="#"/>
                <asp:BoundField DataField="StockOutDate" HeaderText="出库日期" />
                <asp:BoundField DataField="StockOutTypeName" HeaderText="出库类型" />
                <asp:BoundField DataField="UserName" HeaderText="经办人" />
                <asp:BoundField DataField="OrgName" HeaderText="经办部门" />
                <asp:BoundField DataField="CreateTime" HeaderText="录入日期" />
                <asp:BoundField DataField="Description" HeaderText="自动摘要" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <%--
    <ofcc:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="linkButton" >新建出库单</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >修改出库单</ofcc:LinkButton>
    --%>
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="删除出库单后将无法恢复，是否确定删除?" OnClick="btnRemove_Click" CssClass="linkButton" >删除出库单</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnView" runat="server" OnClick="btnView_Click" CssClass="linkButton" >查看出库单</ofcc:LinkButton>
</div>
</asp:Panel>

<asp:Panel ID="pnlEdit" runat="server" Width="95%" Visible="false" CssClass="centerPanel">
    <div class="webPanelBorder" >
        <div class="webPanelCaption">出库单信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">出库日期：
                    </td>
                    <td><asp:TextBox ID="P_StockOutDate" ReadOnly="true" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField1" runat="server" />
                    </td>
                    <td class="tableSubjectWidth">出库类型：
                    </td>
                    <td><ofcc:DropDownList ID="P_StockOutType" runat="server" CssClass="smallInput"></ofcc:DropDownList>
                        <ofcc:RequiredField ID="RequiredField2" runat="server" />
                    </td>
                </tr>
                <tr> 
                  <%--  <td>客    户：
                    </td>
                    <td><asp:TextBox ReadOnly="true" ID="P_CustomerID" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                    </td>--%>
                    <td>备    注：</td>
                    <td colspan="3"><asp:TextBox ReadOnly="true" ID="P_Description" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>经 办 人：</td>
                    <td><asp:TextBox ReadOnly="true" ID="P_LoginName" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                    <td>经办部门：</td>
                    <td><asp:TextBox ReadOnly="true" ID="P_Department" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr> 
            </table>            
        </div> 
    </div>
    <uc1:GoodItems ID="GoodItems" runat="server" />
    <div class="webPanelButtonArea">
        <ofcc:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" ValidationGroup="select">选择</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnSave" runat="server" ConfirmMessage="确定保存出库单吗？" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">保存</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">取消</ofcc:LinkButton>
    </div>
    <asp:HiddenField ID="hfAddOrEdit" runat="server" />
    <asp:HiddenField ID="hfStockOutID" runat="server" />
  <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="P_StockOutDate"
    Display="None" ErrorMessage="请选择出库日期" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="P_StockOutType"
    Display="None" ErrorMessage="请选择业务类型" ValidationGroup="submit"></asp:RequiredFieldValidator>
   
</asp:Panel>

<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />
    
</asp:Content>

